# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdeplasma-addons
pkgver=5.19.4
pkgrel=0
pkgdesc="All kind of addons to improve your Plasma experience"
# mips, ppc64le and s390x blocked by qt5-qtwebengine
# armhf blocked by qt5-qtdeclarative
arch="all !ppc64le !s390x !armhf !mips !mips64"
url="https://www.kde.org/workspaces/plasmadesktop/"
license="LGPL-2.0-only AND GPL-2.0-or-later"
depends="purpose"
depends_dev="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtwebengine-dev karchive-dev
	kconfig-dev kcoreaddons-dev kdeclarative-dev kholidays-dev ki18n-dev
	kiconthemes-dev kio-dev kcmutils-dev kross-dev knotifications-dev
	plasma-framework-dev krunner-dev kservice-dev sonnet-dev kunitconversion-dev
	kwindowsystem-dev knewstuff-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/plasma/$pkgver/kdeplasma-addons-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	# converterrunnertest is broken
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "converterrunnertest"
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="01e43e573b0d1fc1cb62ae469d93974405138e3139a1973a0e78b42f46221feb58efa389e527fb81941df91807da7dc22d56d2b419c652af3af872660c661f12  kdeplasma-addons-5.19.4.tar.xz"
